﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Rating.aspx.vb" Inherits="cricketmania.Rating" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <br />
        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        </asp:ToolkitScriptManager>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="ID" DataSourceID="SqlDataSource1">
            <Columns>
                <asp:BoundField DataField="Results" HeaderText="Results" 
                    SortExpression="Results" />
                <asp:BoundField DataField="schedule" HeaderText="schedule" 
                    SortExpression="schedule" />
                <asp:HyperLinkField DataNavigateUrlFields="ID" 
                    DataNavigateUrlFormatString="Like.aspx?ID={0}" HeaderText="Like" Text="Like" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:maniaConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:maniaConnectionString.ProviderName %>" 
            SelectCommand="SELECT [ID], [Results], [schedule] FROM [crick] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:Rating ID="Rating1" runat="server" CssClass="star" 
        EmptyStarCssClass="star" FilledStarCssClass="star" StarCssClass="star" 
        WaitingStarCssClass="star">

        </asp:Rating>
        <br />
    
        <asp:Button ID="Button1" runat="server" Text="submit " 
        style="margin-left: 2px" Width="159px" />
        <br />
        &nbsp;<asp:GridView ID="GridView2" runat="server" 
        AutoGenerateColumns="False" DataSourceID="SqlDataSource2">
        <Columns>
            <asp:BoundField DataField="Averagerate" HeaderText="Averagerate" 
                ReadOnly="True" SortExpression="Averagerate" />
            <asp:BoundField DataField="Results" HeaderText="Results" 
                SortExpression="Results" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:maniaConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:maniaConnectionString.ProviderName %>" 
        SelectCommand="SELECT [Averagerate], [Results] FROM [crickQuery]">
    </asp:SqlDataSource>
    </p>
    <p>
    </p>
</asp:Content>
